#include "my_triaxial.h"

My_triaxial::My_triaxial(const QString &title, QStringList namelist, QWidget *parent) : QGroupBox(title, parent)
{
    this->setAlignment(Qt::AlignCenter);
    x = new My_label(namelist.at(0), this);
    y = new My_label(namelist.at(1), this);
    z = new My_label(namelist.at(2), this);
    box = new QVBoxLayout();
    box->addWidget(x);
    box->addWidget(y);
    box->addWidget(z);
    box->setContentsMargins(LEFT_M, TOP_M, RIGHT_M, BOTTOM_M);
    box->setSpacing(SPACE_SON);
    this->setLayout(box);
}

void My_triaxial::setNum(double nx, double ny, double nz)
{
    x->set_num(nx);
    y->set_num(ny);
    z->set_num(nz);
}
